﻿@model S4Store.Models.YmList
@{
    Layout = null;
}
<select name="@Model.Name">
   @for (DateTime dt = Model.End; (dt.Year > Model.Start.Year || (dt.Year == Model.Start.Year && dt.Month >= Model.Start.Month)); dt = dt.AddMonths(-1))
   {
   <option   value="@dt.ToString("yyyy-MM-dd")" @if (Model.Current != null && dt.ToString("yyyy-MM") == Model.Current.Value.ToString("yyyy-MM")) { <text>selected="selected"</text> }>@dt.ToString("yyyy-MM")</option>
   }
</select>